package com.zyy.adapter;

/**
 * @Description: 类描述
 * @Author: zyy
 * @Date: 2023/07/24 22:02
 */
public class Client {

    public static void main(String[] args) {
        //方法一
        /*Computer computer = new Computer();
        Adapter adapter = new Adapter();
        computer.net(adapter);*/


        //方法二
        //网线
        Adaptee adaptee = new Adaptee();
        //适配器
        NetToUsb adapter = new Adapter2(adaptee);
        //电脑
        Computer computer = new Computer();
        computer.net(adapter);
    }

}
